package com.yehangtech.designpattern.创建型_工厂方法;

import com.yehangtech.designpattern.创建型_工厂方法.service.GoodsFactory;
import com.yehangtech.designpattern.创建型_工厂方法.service.IPrize;

import java.util.HashMap;

public class Main {
    public static void main(String[] args) {
        GoodsFactory goodsFactory = new GoodsFactory();
        //得到优惠券奖品
        IPrize prize = goodsFactory.getPrize(1);
        prize.sendPrize(1, 2, null);

        //得到线下实物奖品
        IPrize prize1 = goodsFactory.getPrize(2);
        prize1.sendPrize(2, 3, new HashMap<>(16));


    }
}
